package com.atguigu.daijia.driver.service;

import com.atguigu.daijia.model.entity.driver.DriverInfo;
import com.atguigu.daijia.model.entity.driver.DriverSet;
import com.atguigu.daijia.model.form.driver.DriverFaceModelForm;
import com.atguigu.daijia.model.form.driver.UpdateDriverAuthInfoForm;
import com.atguigu.daijia.model.vo.driver.DriverAuthInfoVo;
import com.atguigu.daijia.model.vo.driver.DriverInfoVo;
import com.atguigu.daijia.model.vo.driver.DriverLoginVo;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * @author XiangLiang
 */
public interface DriverInfoService extends IService<DriverInfo> {

    /**
     * 小程序授权登录
     *
     * @param code 授权码
     * @return 客户id
     */
    Long login(String code);

    /**
     * 获取司机登录信息
     *
     * @param driverId 司机id
     * @return 司机信息实体
     */
    DriverLoginVo getDriverInfo(Long driverId);

    /**
     * 获取司机认证信息
     *
     * @param driverId 司机id
     * @return 司机认证信息VO
     */
    DriverAuthInfoVo getDriverAuthInfo(Long driverId);

    /**
     * 更新司机认证信息
     *
     * @param updateDriverAuthInfoForm 更新司机认证信息VO
     * @return 更新结果
     */
    Boolean updateDriverAuthInfo(UpdateDriverAuthInfoForm updateDriverAuthInfoForm);

    /**
     * 创建司机人脸模型
     *
     * @param driverFaceModelForm 司机人脸模型VO
     * @return 创建结果
     */
    Boolean creatDriverFaceModel(DriverFaceModelForm driverFaceModelForm);

    /**
     * 获取司机设置信息
     *
     * @param driverId 司机id
     */
    DriverSet getDriverSet(Long driverId);

    /**
     * 判断司机当日是否进行过人脸识别
     *
     * @param driverId 司机Id
     */
    Boolean isFaceRecognition(Long driverId);

    /**
     * 验证司机人脸
     *
     * @param driverFaceModelForm 司机人脸模型VO
     */
    Boolean verifyDriverFace(DriverFaceModelForm driverFaceModelForm);

    /**
     * 更新接单状态
     *
     * @param driverId 司机Id
     * @param status   更新状态
     */
    Boolean updateServiceStatus(Long driverId, Integer status);

    /**
     * 获取司机基本信息
     *
     * @param driverId 司机Id
     */
    DriverInfoVo getDriverInfoOrder(Long driverId);

    /**
     * 获取司机OpenId
     *
     * @param driverId 司机Id
     */
    String getDriverOpenId(Long driverId);
}
